﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using FarseerPhysics.Dynamics;
using FarseerPhysics.Factories;
using FarseerPhysics.Common;
using FarseerPhysics.Collision.Shapes;

namespace BHG.System
{
    class BallObject : GameObject
    {

        public BallObject(Vector2 pos, float radius, float xRot, bool dynamic, Model model):base(pos,xRot,dynamic,model, CreateShape(radius))
        {
        }

        public BallObject(Vector2 pos, float radius, float xRot, bool dynamic, Model model, float scale, int polygons)
            : base(pos, xRot, dynamic, model, CreateShape(radius,polygons), scale)
        {
        }

        public static Shape CreateShape(float radius)
        {
            return CreateShape(radius, 10);
        }
        public static Shape CreateShape(float radius, int polygons)
        {
            PolygonShape shape = new PolygonShape(PolygonTools.CreateCircle(radius, polygons));
            return shape;
        }

    }
}
